﻿#ifndef PANEL_H
#define PANEL_H

#include "searchbox.h"
#include "note.h"
#include "memo.h"
#include "favorite.h"
#include "todo.h"
#include "toolbox.h"
#include "journal.h"

namespace Ui {
class Panel;
}

class Panel : public QWidget
{
    Q_OBJECT

public:
    explicit Panel(QWidget *parent = 0);
    ~Panel();

    void createTray();
    void detectVisible();
    void showNote();
    void showMemo();
    void showSearchbox();
    void showFavorite();
    void showJournal();
    void showToolbox();
    void showTodo();

protected:
    void keyPressEvent(QKeyEvent *event);

protected slots:
    void trayActivated(QSystemTrayIcon::ActivationReason reason);


private slots:
    void on_btn_search_clicked();

private:
    Ui::Panel *ui;

    QMenu *trayMenu;
    QSystemTrayIcon *tray;

    Note *note;
    Memo *memo;
    Favorite *favorite;
    Todo *todo;
    Journal *journal;
    Toolbox *toolbox;
    Searchbox *searchbox;
};

#endif // PANEL_H
